package com.mxx.common.generator;

public interface Constant {

    public static class TableMetadata {
        public static final String TABLE_NAME = "TABLE_NAME";
        public static final String TABLE_TYPE = "TABLE_TYPE";
        public static final String TABLE_CAT = "TABLE_CAT";
        public static final String REMARKS = "REMARKS";
        public static final String[] ALL = {TABLE_NAME, TABLE_TYPE, TABLE_CAT, REMARKS};

    }

    public static class FieldMetadata {
        public static final String COLUMN_NAME = "COLUMN_NAME";
        public static final String COLUMN_SIZE = "COLUMN_SIZE";
        public static final String COLUMN_DEF = "COLUMN_DEF";
        public static final String TYPE_NAME = "TYPE_NAME";
        public static final String DATA_TYPE = "DATA_TYPE";
        public static final String NULLABLE = "NULLABLE";
        public static final String REMARKS = "REMARKS";
        public static final String IS_AUTOINCREMENT = "IS_AUTOINCREMENT";
        public static final String IS_GENERATEDCOLUMN = "IS_GENERATEDCOLUMN";
        public static final String[] ALL = {COLUMN_NAME, COLUMN_SIZE, COLUMN_DEF, TYPE_NAME, REMARKS, IS_AUTOINCREMENT, IS_GENERATEDCOLUMN};

    }

    public static class IndexMetadata {
        public static final String NON_UNIQUE = "NON_UNIQUE";
        public static final String INDEX_NAME = "INDEX_NAME";
        public static final String TYPE = "TYPE";
        public static final String ORDINAL_POSITION = "ORDINAL_POSITION";
        public static final String COLUMN_NAME = "COLUMN_NAME";
        public static final String ASC_OR_DESC = "ASC_OR_DESC";
        public static final String[] ALL = {COLUMN_NAME, NON_UNIQUE, INDEX_NAME, TYPE, ORDINAL_POSITION, ASC_OR_DESC};

    }

    enum EntityType {
        CLASS("class"),
        INTERFACE("interface"),
        ANNOTATION("@interface"),
        ENUM("enum"),
        ;
        private String text;

        EntityType(String text) {
            this.text = text;
        }

        public String getText() {
            return text;
        }
    }

    enum EntityState {
        NONE(""),
        FINAL_STATIC("final static "),
        ABSTRACT("abstract "),
        FINAL("final "),
        STATIC("static "),
        ;
        private String text;

        EntityState(String text) {
            this.text = text;
        }

        public String getText() {
            return text;
        }
    }

    enum EntityVisible {
        PUBLIC("public "),
        PROTECTED("protected "),
        PRIVATE("private "),
        ;
        private String text;

        EntityVisible(String text) {
            this.text = text;
        }

        public String getText() {
            return text;
        }
    }
}
